// import { useAxios } from '@/hooks/web/useAxios/index copy'
const request = useAxios()
import { useAxios } from '@/hooks/web/useAxios'
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// Ip所属列表
export const ucIpOwnerListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucIpOwnerList',
      data: data
    }
  })
}

// Ip所属新增
export const ucIpOwnerAddApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucIpOwnerAdd',
      data: data
    }
  })
}

// Ip所属查看
export const ucIpOwnerSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucIpOwnerSee',
      data: data
    }
  })
}

// Ip所属修改
export const ucIpOwnerEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucIpOwnerEdit',
      data: data
    }
  })
}

// Ip所属删除
export const ucIpOwnerDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucIpOwnerDel',
      data: data
    }
  })
}

// 获取组织
export const ucOrgListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucOrgList',
      data: data
    }
  })
}

// 获取部门
export const ucDeptListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucDeptList',
      data: data
    }
  })
}

// 获取人员
export const ucOrgDeptUserListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucOrgDeptUserList',
      data: data
    }
  })
}
